package com.ljz.controller.app;


import com.ljz.common.core.controller.MyBaseController;
import com.ljz.common.utils.ReturnResult;
import com.ljz.service.CategoryService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/api/app")
@Api(tags = "分类接口")
public class CategoryPcController extends MyBaseController {

    @Autowired
    CategoryService categoryService;

    @ApiOperation("根据id获取分类信息")
    @GetMapping("/category")
    public ReturnResult getCategoryService(Long id) {
        return  success("分类信息",categoryService.findCategoryById(id));
    }
}


